package com.designpattern.factory.abtractFactory;

import com.designpattern.factory.CarFacotry;
import com.designpattern.factory.Movable;

/**
 *工厂方法
 */
public class Main {

    public static void main(String[] args) {
        AbstractFactory factory = new ModernFactory();
        Vehicle c = factory.createVehicle();
        c.go();
        Weapon w = factory.createWeapon();
        w.shoot();
        Food f = factory.createFood();
        f.printName();
    }
}
